3.3.6 \(\int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx\) [206]

3.3.6.1 Optimal result
3.3.6.2 Mathematica [B] (warning: unable to verify)
3.3.6.3 Rubi [F]
3.3.6.4 Maple [F]
3.3.6.5 Fricas [F]
3.3.6.6 Sympy [F]
3.3.6.7 Maxima [F]
3.3.6.8 Giac [F]
3.3.6.9 Mupad [F(-1)]

3.3.6.1 Optimal result

Integrand size = 23, antiderivative size = 284 \[ \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx=\frac {a g \left (1-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )^{\frac {1}{2} (-1+p)} \operatorname {Hypergeometric2F1}\left (\frac {1-p}{2},\frac {1-p}{2},\frac {3-p}{2},\frac {\cos ^2(e+f x)-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}}{1-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}}\right ) \sin ^2(e+f x)^{\frac {1-p}{2}} (g \tan (e+f x))^{-1+p}}{\left (a^2-b^2\right ) f (-1+p)}+\frac {b \operatorname {AppellF1}\left (\frac {1-p}{2},-\frac {p}{2},1,\frac {3-p}{2},\cos ^2(e+f x),\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right ) \cos (e+f x) \sin ^2(e+f x)^{-p/2} (g \tan (e+f x))^p}{\left (-a^2+b^2\right ) f (-1+p)} \]

output
a*g*(1-b^2*cos(f*x+e)^2/(-a^2+b^2))^(-1/2+1/2*p)*Hypergeometric2F1(1/2-1/2 
*p,1/2-1/2*p,3/2-1/2*p,(cos(f*x+e)^2-b^2*cos(f*x+e)^2/(-a^2+b^2))/(1-b^2*c 
os(f*x+e)^2/(-a^2+b^2)))*(sin(f*x+e)^2)^(1/2-1/2*p)*(g*tan(f*x+e))^(-1+p)/ 
(a^2-b^2)/f/(-1+p)+b*AppellF1(1/2-1/2*p,-1/2*p,1,3/2-1/2*p,cos(f*x+e)^2,b^ 
2*cos(f*x+e)^2/(-a^2+b^2))*cos(f*x+e)*(g*tan(f*x+e))^p/(-a^2+b^2)/f/(-1+p) 
/((sin(f*x+e)^2)^(1/2*p))
 
3.3.6.2 Mathematica [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(858\) vs. \(2(284)=568\).

Time = 14.05 (sec) , antiderivative size = 858, normalized size of antiderivative = 3.02 \[ \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx=\frac {\tan ^{1+p}(e+f x) (g \tan (e+f x))^p \left (\left (a^2-b^2\right ) (1+p) \operatorname {AppellF1}\left (\frac {2+p}{2},-\frac {1}{2},1,\frac {4+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right ) \tan (e+f x)+a \left (b (2+p) \operatorname {Hypergeometric2F1}\left (1,\frac {1+p}{2},\frac {3+p}{2},\frac {\left (-a^2+b^2\right ) \tan ^2(e+f x)}{a^2}\right )-a (1+p) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+\frac {p}{2},2+\frac {p}{2},-\tan ^2(e+f x)\right ) \tan (e+f x)\right )\right )}{a^2 b f (1+p) (2+p) (a+b \sin (e+f x)) \left (\frac {\sec ^2(e+f x) \tan ^p(e+f x) \left (\left (a^2-b^2\right ) (1+p) \operatorname {AppellF1}\left (\frac {2+p}{2},-\frac {1}{2},1,\frac {4+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right ) \tan (e+f x)+a \left (b (2+p) \operatorname {Hypergeometric2F1}\left (1,\frac {1+p}{2},\frac {3+p}{2},\frac {\left (-a^2+b^2\right ) \tan ^2(e+f x)}{a^2}\right )-a (1+p) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+\frac {p}{2},2+\frac {p}{2},-\tan ^2(e+f x)\right ) \tan (e+f x)\right )\right )}{a^2 b (2+p)}+\frac {\tan ^{1+p}(e+f x) \left (\left (a^2-b^2\right ) (1+p) \operatorname {AppellF1}\left (\frac {2+p}{2},-\frac {1}{2},1,\frac {4+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right ) \sec ^2(e+f x)+\left (a^2-b^2\right ) (1+p) \tan (e+f x) \left (\frac {2 \left (-1+\frac {b^2}{a^2}\right ) (2+p) \operatorname {AppellF1}\left (1+\frac {2+p}{2},-\frac {1}{2},2,1+\frac {4+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right ) \sec ^2(e+f x) \tan (e+f x)}{4+p}+\frac {(2+p) \operatorname {AppellF1}\left (1+\frac {2+p}{2},\frac {1}{2},1,1+\frac {4+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right ) \sec ^2(e+f x) \tan (e+f x)}{4+p}\right )+a \left (-a (1+p) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+\frac {p}{2},2+\frac {p}{2},-\tan ^2(e+f x)\right ) \sec ^2(e+f x)-2 a \left (1+\frac {p}{2}\right ) (1+p) \sec ^2(e+f x) \left (-\operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+\frac {p}{2},2+\frac {p}{2},-\tan ^2(e+f x)\right )+\frac {1}{\sqrt {1+\tan ^2(e+f x)}}\right )+b (1+p) (2+p) \csc (e+f x) \sec (e+f x) \left (-\operatorname {Hypergeometric2F1}\left (1,\frac {1+p}{2},\frac {3+p}{2},\frac {\left (-a^2+b^2\right ) \tan ^2(e+f x)}{a^2}\right )+\frac {1}{1-\frac {\left (-a^2+b^2\right ) \tan ^2(e+f x)}{a^2}}\right )\right )\right )}{a^2 b (1+p) (2+p)}\right )} \]

input
Integrate[(g*Tan[e + f*x])^p/(a + b*Sin[e + f*x]),x]
 
output
(Tan[e + f*x]^(1 + p)*(g*Tan[e + f*x])^p*((a^2 - b^2)*(1 + p)*AppellF1[(2 
+ p)/2, -1/2, 1, (4 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2 
]*Tan[e + f*x] + a*(b*(2 + p)*Hypergeometric2F1[1, (1 + p)/2, (3 + p)/2, ( 
(-a^2 + b^2)*Tan[e + f*x]^2)/a^2] - a*(1 + p)*Hypergeometric2F1[1/2, 1 + p 
/2, 2 + p/2, -Tan[e + f*x]^2]*Tan[e + f*x])))/(a^2*b*f*(1 + p)*(2 + p)*(a 
+ b*Sin[e + f*x])*((Sec[e + f*x]^2*Tan[e + f*x]^p*((a^2 - b^2)*(1 + p)*App 
ellF1[(2 + p)/2, -1/2, 1, (4 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e 
 + f*x]^2]*Tan[e + f*x] + a*(b*(2 + p)*Hypergeometric2F1[1, (1 + p)/2, (3 
+ p)/2, ((-a^2 + b^2)*Tan[e + f*x]^2)/a^2] - a*(1 + p)*Hypergeometric2F1[1 
/2, 1 + p/2, 2 + p/2, -Tan[e + f*x]^2]*Tan[e + f*x])))/(a^2*b*(2 + p)) + ( 
Tan[e + f*x]^(1 + p)*((a^2 - b^2)*(1 + p)*AppellF1[(2 + p)/2, -1/2, 1, (4 
+ p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2]*Sec[e + f*x]^2 + ( 
a^2 - b^2)*(1 + p)*Tan[e + f*x]*((2*(-1 + b^2/a^2)*(2 + p)*AppellF1[1 + (2 
 + p)/2, -1/2, 2, 1 + (4 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f 
*x]^2]*Sec[e + f*x]^2*Tan[e + f*x])/(4 + p) + ((2 + p)*AppellF1[1 + (2 + p 
)/2, 1/2, 1, 1 + (4 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2 
]*Sec[e + f*x]^2*Tan[e + f*x])/(4 + p)) + a*(-(a*(1 + p)*Hypergeometric2F1 
[1/2, 1 + p/2, 2 + p/2, -Tan[e + f*x]^2]*Sec[e + f*x]^2) - 2*a*(1 + p/2)*( 
1 + p)*Sec[e + f*x]^2*(-Hypergeometric2F1[1/2, 1 + p/2, 2 + p/2, -Tan[e + 
f*x]^2] + 1/Sqrt[1 + Tan[e + f*x]^2]) + b*(1 + p)*(2 + p)*Csc[e + f*x]*...
 
3.3.6.3 Rubi [F]

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)}dx\)

\(\Big \downarrow \) 3211

\(\displaystyle \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)}dx\)

input
Int[(g*Tan[e + f*x])^p/(a + b*Sin[e + f*x]),x]
 
output
$Aborted
 

3.3.6.3.1 Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3211
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*( 
x_)])^(p_.), x_Symbol] :> Unintegrable[(a + b*Sin[e + f*x])^m*(g*Tan[e + f* 
x])^p, x] /; FreeQ[{a, b, e, f, g, m, p}, x]
 
3.3.6.4 Maple [F]

\[\int \frac {\left (g \tan \left (f x +e \right )\right )^{p}}{a +b \sin \left (f x +e \right )}d x\]

input
int((g*tan(f*x+e))^p/(a+b*sin(f*x+e)),x)
 
output
int((g*tan(f*x+e))^p/(a+b*sin(f*x+e)),x)
 
3.3.6.5 Fricas [F]

\[ \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx=\int { \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{b \sin \left (f x + e\right ) + a} \,d x } \]

input
integrate((g*tan(f*x+e))^p/(a+b*sin(f*x+e)),x, algorithm="fricas")
 
output
integral((g*tan(f*x + e))^p/(b*sin(f*x + e) + a), x)
 
3.3.6.6 Sympy [F]

\[ \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx=\int \frac {\left (g \tan {\left (e + f x \right )}\right )^{p}}{a + b \sin {\left (e + f x \right )}}\, dx \]

input
integrate((g*tan(f*x+e))**p/(a+b*sin(f*x+e)),x)
 
output
Integral((g*tan(e + f*x))**p/(a + b*sin(e + f*x)), x)
 
3.3.6.7 Maxima [F]

\[ \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx=\int { \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{b \sin \left (f x + e\right ) + a} \,d x } \]

input
integrate((g*tan(f*x+e))^p/(a+b*sin(f*x+e)),x, algorithm="maxima")
 
output
integrate((g*tan(f*x + e))^p/(b*sin(f*x + e) + a), x)
 
3.3.6.8 Giac [F]

\[ \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx=\int { \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{b \sin \left (f x + e\right ) + a} \,d x } \]

input
integrate((g*tan(f*x+e))^p/(a+b*sin(f*x+e)),x, algorithm="giac")
 
output
integrate((g*tan(f*x + e))^p/(b*sin(f*x + e) + a), x)
 
3.3.6.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(g \tan (e+f x))^p}{a+b \sin (e+f x)} \, dx=\int \frac {{\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p}{a+b\,\sin \left (e+f\,x\right )} \,d x \]

input
int((g*tan(e + f*x))^p/(a + b*sin(e + f*x)),x)
 
output
int((g*tan(e + f*x))^p/(a + b*sin(e + f*x)), x)